package com.laborder.sysyy.dao;


import com.laborder.sysyy.entity.Teacher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
 /**
   * @function: 教师列表DAO层
   * @author: 759057893@qq.com lyz
   * @date: 2019/1/11 17:12
   */
@Repository
@Mapper
public interface TeacherDaoMapper {
	
	  /**
	    * @function: 分页查询
	    * @author: 759057893@qq.com lyz
	    * @date: 2019/1/11 17:10
	    */
	 List<Teacher> findTeacherWithPage(Map<String, Object> map);
	  /**
	    * @function: 查询总数
	    * @author: 759057893@qq.com lyz
	    * @date: 2019/1/11 17:10
	    */
	 int getTeacherCount(Map<String, Object> map);
	  /**
	    * @function: 根据ID查询
	    * @author: 759057893@qq.com lyz
	    * @date: 2019/1/11 17:10
	    */
	 Teacher getTeacherInfo(int tId);
	  /**
	    * @function: 添加教师信息
	    * @author: 759057893@qq.com lyz
	    * @date: 2019/1/11 17:10
	    */
	 int saveTeacherInfo(Teacher teacher);
	  /**
	    * @function: 更新教师信息
	    * @author: 759057893@qq.com lyz
	    * @date: 2019/1/11 17:11
	    */
	 int updateTeacherInfo(Teacher teacher);
	 /**
	   * @function: 删除教师信息
	   * @author: 759057893@qq.com lyz
	   * @date: 2019/1/11 17:11
	   */
	int delTeacherInfo(int tId);
	 /**
	   * @function: 批量除教师信息
	   * @author: 759057893@qq.com lyz
	   * @date: 2019/1/11 17:12
	   */
	int delManyTeacherInfo(int tId);

	 /**
	   * @function: 通过教师名称和手机号查重
	   * @author: 759057893@qq.com lyz
	   * @date: 2019/1/11 17:12
	   */
	Teacher getTeacherInfoByName(@Param("tName") String tName, @Param("tPhone")String tPhone);
	 /**
	   * @function: 查询教师信息
	   * @author: 759057893@qq.com lyz
	   * @date: 2019/1/9 22:18
	   */
	List<Teacher> getAllTeacher();

	 /**
	   * @function: 根据Id查询教师信息
	   * @author: 759057893@qq.com lyz
	   * @date: 2019/1/10 14:39
	   */
	Teacher selectTeacherById(int tId);
}
